import request from "./request";


// 请求轮播图数据
export const reqGetBanners = () => {
  return request({
    method: "GET",
    url: "/banner",
  });
};




// 热门搜索
export const reqGetserachHot=()=>{
  return request({
    method:'GET',
    url:'/search/hot'
  })
};

// 根据关键字搜索
export const reqGetserachSuggest=({ keywords = "" })=>{
  return request({
    method:'GET',
    url:`/search/suggest?keywords=${keywords}`
  })
};

// 登录
export const Login = ({phone="",password=""})=>{
  return request({
    method:'GET',
    url:`/login/cellphone?phone=${phone}&password=${password}`
  })
};

// 热门歌单分类
export const reqGetHotList = ()=>{
  return request({
    method:'GET',
    url:'/playlist/hot'
  })
};

// 获取歌单 ( 网友精选碟 )
export const reqPlayList = ({order = "hot", cat = "", limit = 50, offset = 0 })=>{
  return request({
    method:'GET',
    url:`/top/playlist?order=${order}&cat=${cat}&limit=${limit}&$offset=${offset}`
  })
};

//新碟上架
export const reqGetAblumList =({limit="",offset=0,area="all",type="new",year="",month=""})=>{
  return request({
    method:'GET',
    url:`/top/album?limit=${limit}&offset=${offset}&area=${area}&type=${type}&year=${year}&month=${month}`
  })
};

// 获取所有榜单内容
export const reqGetTopListDetail=()=>{
  return request({
    method:'GET',
    url:'/toplist/detail'
  })
};

//获取歌单详情
export const reqGetDetail=({id="",s="8"})=>{
  return request({
    method:'GET',
    url:`/playlist/detail?id=${id}&s=${s}`
  })
};

//获取最新mv
export const reqGetMv=({limit=10,area=""})=>{
  return request({
    method:'GET',
    url:`/mv/first?limit=${limit}&area=${area}`
  })
};

//热门歌手
export const reqGetArtists=({limit=9,offset=0})=>{
  return request({
    method:'GET',
    url:`/top/artists?limit=${limit}&offset=${offset}`
  })
};


